<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" href="bootstrap-5.3.0-alpha1-dist/css/bootstrap.min.css">
  <script src="js/jquery-3.7.1.js"></script>
  <!-- 必须引入 -->
  <script src="bootstrap-5.3.0-alpha1-dist/js/bootstrap.min.js"></script>

  <style>
    .限制大小 {
      width: 800px;
      height: 600px;
    }

    .限制大小 img {
      /* object-fit: cover; */
      width: 800px;
      height: 400px;
    }
  </style>
</head>

<body>

  <div class="限制大小">




    <!-- 轮播 -->
    <div id="demo" class="carousel slide" data-bs-ride="carousel">

      <!-- 指示符 -->
      <div class="carousel-indicators">
        <button type="button" data-bs-target="#demo" data-bs-slide-to="0" class="active"></button>
        <button type="button" data-bs-target="#demo" data-bs-slide-to="1"></button>
        <button type="button" data-bs-target="#demo" data-bs-slide-to="2"></button>
        <button type="button" data-bs-target="#demo" data-bs-slide-to="3"></button>
        <button type="button" data-bs-target="#demo" data-bs-slide-to="4"></button>
        <button type="button" data-bs-target="#demo" data-bs-slide-to="5"></button>
      </div>

      <!-- 轮播图片 -->
      <div class="carousel-inner">
        <div class="carousel-item active">
          <img src="img/1.jpg" class="d-block" style="width:100%">
          <!-- 图片描述 -->
          <div class="carousel-caption">
            <h3>村花雪月</h3>
            <p>第一次和心爱的女孩到这里！！！</p>
          </div>
        </div>
        <div class="carousel-item">
          <img src="img/2.jpg" class="d-block" style="width:100%">
          <!-- 图片描述 -->
          <div class="carousel-caption">
            <h3>村花雪月</h3>
            <p>第一次和心爱的女孩到这里！！！</p>
          </div>
        </div>
        <div class="carousel-item">
          <img src="img/3.jpg" class="d-block" style="width:100%">
          <!-- 图片描述 -->
          <div class="carousel-caption">
            <h3>村花雪月</h3>
            <p>第一次和心爱的女孩到这里！！！</p>
          </div>
        </div>




        <div class="carousel-item active">
          <img src="img/4.jpg" class="d-block" style="width:100%">
          <!-- 图片描述 -->
          <div class="carousel-caption">
            <h3>村花雪月</h3>
            <p>第一次和心爱的女孩到这里！！！</p>
          </div>

        </div>
        <div class="carousel-item">
          <img src="img/5.jpg" class="d-block" style="width:100%">
          <!-- 图片描述 -->
          <div class="carousel-caption">
            <h3>村花雪月</h3>
            <p>第一次和心爱的女孩到这里！！！</p>
          </div>
        </div>
        <div class="carousel-item">
          <img src="img/6.jpg" class="d-block" style="width:100%">
          <!-- 图片描述 -->
          <div class="carousel-caption">
            <h3>村花雪月</h3>
            <p>第一次和心爱的女孩到这里！！！</p>
          </div>
        </div>
      </div>

      <!-- 左右切换按钮 -->
      <button class="carousel-control-prev" type="button" data-bs-target="#demo" data-bs-slide="prev">
        <span class="carousel-control-prev-icon"></span>
      </button>
      <button class="carousel-control-next" type="button" id="btn-next" data-bs-target="#demo" data-bs-slide="next">
        <span class="carousel-control-next-icon"></span>
      </button>
    </div>


  </div>


  <!-- 为图片添加描述

在每个 <div class="carousel-item"> 内添加 <div class="carousel-caption"> 来设置轮播图片的描述文本：:

实例
<div class="carousel-item">
  <img src="https://static.jyshare.com/images/mix/img_fjords_wide.jpg" class="d-block" style="width:100%">
  <div class="carousel-caption">
        <h3>第一张图片描述标题</h3>
        <p>第一张图片描述内容显示在这里！！！</p>
  </div>
</div>

-->



  <script>
    $(document).ready(function () {



      //       // 获取按钮元素
      // const button = $("#btn-next");



      // setInterval(() => {
      //   console.log("出发！");
      //     // 触发按钮的点击事件
      // button.trigger("click");
      // }, 500);

    })
  </script>
</body>

</html>